package com.app.model;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;

import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 消费多送系统分成券记录
 * </p>
 *
 * @author yoominic
 * @since 2024-07-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tb_consumption_voucher")
public class ConsumptionVoucher implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单表ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单号
     */
    private String orderId;

    /**
     * 券值
     */
    private BigDecimal voucher;

    private BigDecimal userVoucher;

    /**
     * 类型  1需激活  2需分享
     */
    private String type;

    /**
     * 核验码
     */
    private String verificationCode;

    private String verificationFilepath;

    private String voucherFilepath;

    /**
     * 订单状态 1待使用 2待激活 3失效
     */
    private Integer status;

    /**
     * 商家ID
     */
    private Integer businessId;

    /**
     * 用户ID
     */
    private Integer userId;

    /**
     * 生成时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp createTime;

    /**
     * 过期时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp expirationTime;

    /**
     * 使用时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp usageTime;


}
